package java_class_work.week04;

/**
 * 自定义异常类 测试
 */
public class TestDIYException {
    public static void main(String[] args) throws DIYException {
        String s = "女生";
        if (!s.equals("男生")) {
            // Unhandled exception，需在方法中向上抛出
            throw new DIYException("请输入男生！");
        }
        System.out.println(s);

    }
}
